import {
  IColorLink,
  IColorText
} from '../types';

/**
 * 链接
 * 
 * * LINK_XX
 *   - `LINK_PRIMARY`
 *   - `LINK_SECONDARY`
 *   - `LINK_TERTIARY` 
 *   - `LINK_BRAND` 
 *   - `LINK_BRAND_SECONDARY` 
 * * 每个 LINK_XX 会有以下变种 _VISITED / _HOVER / _ACTIVE 三个变种
 *   - `_VISITED` 对 `:visited`
 *   - `_HOVER` 对 `:hover` + `:focus`
 *   - `_ACTIVE` 对 `:active`
 * * 一个 LINK_DISABLED
 */
export default function createConstColorLink(fg: IColorText): IColorLink {
  return {
    LINK_PRIMARY: fg.TEXT_ACCENT,
    LINK_PRIMARY_VISITED: fg.TEXT_ACCENT,
    LINK_PRIMARY_HOVER: fg.TEXT_ACCENT_HOVER,
    LINK_PRIMARY_ACTIVE: fg.TEXT_ACCENT_ACTIVE,
    LINK_SECONDARY: fg.TEXT_SECONDARY,
    LINK_SECONDARY_VISITED: fg.TEXT_SECONDARY,
    LINK_SECONDARY_HOVER: fg.TEXT_ACCENT,
    LINK_SECONDARY_ACTIVE: fg.TEXT_ACCENT,
    LINK_TERTIARY: fg.TEXT_SECONDARY,
    LINK_TERTIARY_VISITED: fg.TEXT_SECONDARY,
    LINK_TERTIARY_HOVER: fg.TEXT_PRIMARY,
    LINK_TERTIARY_ACTIVE: fg.TEXT_PRIMARY,
    LINK_BRAND: fg.TEXT_BRAND,
    LINK_BRAND_VISITED: fg.TEXT_BRAND,
    LINK_BRAND_HOVER: fg.TEXT_BRAND_HOVER,
    LINK_BRAND_ACTIVE: fg.TEXT_BRAND_ACTIVE,
    LINK_BRAND_SECONDARY: fg.TEXT_SECONDARY,
    LINK_BRAND_SECONDARY_VISITED: fg.TEXT_SECONDARY,
    LINK_BRAND_SECONDARY_HOVER: fg.TEXT_BRAND,
    LINK_BRAND_SECONDARY_ACTIVE: fg.TEXT_BRAND,
    LINK_DISABLED: fg.TEXT_DISABLED
  };
}
